<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

	<title>Installing Citru</title>
	<link rel="stylesheet" href="css/doc.css" type="text/css" media="screen" title="Documentation stylesheet" charset="utf-8">
	
</head>

<body>
	
<div id="header">
	<p>Difficulty level: Easy</p>
	<p>Last revised: 2008-04-08</p>
	<p>Used Citru version: Citru Alpha Yuzu r50</p>
	<div id="logo"><a href="http://www.citru.se/"></a></div>
</div>
<div id="page">
	<h1>Installing Citru</h1>
	<p class="preamble">The installation of Citru is just a few short steps once you have the required server platform.</p>
	
	<div class="infobox">
		<h2>Short version</h2>
		<ul>
			<li>You will need a web server with support for PHP 5 and MySQL, a database and a user.</li>
			<li>Use a web browser to run the file install.php from your server.</li>
			<li>Enter database settings.</li>
			<li>Create an administrative account</li>
			<li>You're done! Log in at your_server/admin</li>
		</ul>
	</div>
	
	<div class="warning">
		<p>Note that Citru is not ready for production use yet.</p>
	</div>
	
	<h2>The slightly longer version</h2>
	<h3>1. Before you begin</h3>
	<p>To install Citru you will need a web server with support for PHP 5 and a database server. Currently the only supported database server is MySQL. You will also need a database and a user for that database. An installation of subversion is also required.</p>
	<p>If you do not already have a server that meets those needs you could either get an account at a hosting provider or set up your own server. I recommend <a href="http://www.ubuntu.com/products/WhatIsUbuntu/serveredition">Ubuntu Server Edition</a> which is free, easy to install and works well.</p>
	
	<h3>2. Obtaining Citru</h3>
	<p>Before you can install Citru you will need a copy of it. The best way to obtain Citru is by downloading the tar archive.</p>
	<p>You can download the archive of Citru from <a href="http://www.citru.se/download">www.citru.se/download</a>.</p>
	<p>If you want the latest revision, do a checkout from our subversion repository with the following command. Make sure you are in the directory where you want your Citru installation.</p>
	<p><code>svn checkout http://citru.googlecode.com/svn/trunk/ citru-read-only</code></p>
	
	<h3>3. Database settings</h3>
	<p>To start the installation just point your web browser to your_server/install.php</p>
	<p>Hopefully you will now see an installation prompt. The first thing to do is to enter your database settings. If you run the database server on the same host as the web server, just enter localhost.</p>
	
	<div class="example">
		<h4>Example: database settings</h4>
		<p>In the following example, the web server and database server reside on the same computer. The database is named Citru_data and can be accessed by the user Citru_user.</p>
		<p><code>Database type: Mysql<br />
				 Database host: localhost<br />
				 Database user: Citru_user<br />
				 Database pass: D4jn3Se,43Ara%dw<br />
				 Database name: Citru_data</code></p>
	</div>
	
	<div class="errors">
		<h4>Problems you might encounter</h4>
		<p class="error"><span>Problem:</span> <code>Could not connect to database server</code></p>
		<p><span>Solution:</span> You may have entered the wrong username or password. It is also possible that the database server is not running or that the host is wrong.</p>
		<p class="error"><span>Problem:</span> <code>Could not select database.</code></p>
		<p><span>Solution:</span> The database name is most likely wrong, check it and try again.</p>
		<p class="error"><span>Problem:</span> <code>You already have a settings file: config/settings.php</code></p>
		<p><span>Solution:</span> You can either rename or remove your current settings file.</p>
		<p class="error"><span>Problem:</span> <code>Could not write to config directory.</code></p>
		<p><span>Solution:</span> Make sure that the config folder is writable by the web server.</p>
	</div>
	
	<h3>4. Creating a user</h3>
	
	<p>The next step is to create an administrator account for Citru. Choose a username you would like to log in with and a strong secure password.</p>
	<p>Usernames must be at least 4 characters long. Passwords must be at least 8 characters long and contain at least three of the following groups: lowercase char, uppercase char, number, special character (ex: #@%*?!:;.,).</p>

	<div class="errors">
		<h4>Problems you might encounter</h4>
		<p class="error"><span>Problem:</span> The username or password is not accepted</p>
		<p><span>Solution:</span> Make sure that your username and password meet the above criteria.</p>
		<p class="error"><span>Problem:</span> <code>Could not create table</code>, or a similar error message.</p>
		<p><span>Solution:</span> If any of the tables could not be created there is something wrong with the database setup. Verify that the database user has permission to create tables.</p>
	</div>

	<h3>5. Logging in</h3>
	<p>After the installation is finished you can log in at your_server/admin/ and that's it!</p>
	
	<h3><a href="http://www.citru.se/doc">Read more about Citru</a></h3>
</div>

</body>
</html>
